.class public Lcom/ninesky/browser/view/TagCloudView;
.super Landroid/widget/TextView;


# static fields
.field private static b:[I

.field private static c:[[I

.field private static d:[Landroid/content/res/ColorStateList;


# instance fields
.field private a:Lcom/ninesky/browser/view/bi;


# direct methods
.method static constructor <clinit>()V
    .locals 8

    const/4 v7, 0x2

    const/4 v6, 0x5

    const/4 v5, 0x1

    const/4 v4, 0x0

    const/4 v3, 0x3

    new-array v0, v6, [I

    fill-array-data v0, :array_0

    sput-object v0, Lcom/ninesky/browser/view/TagCloudView;->b:[I

    new-array v0, v6, [[I

    new-array v1, v3, [I

    fill-array-data v1, :array_1

    aput-object v1, v0, v4

    new-array v1, v3, [I

    fill-array-data v1, :array_2

    aput-object v1, v0, v5

    new-array v1, v3, [I

    fill-array-data v1, :array_3

    aput-object v1, v0, v7

    new-array v1, v3, [I

    fill-array-data v1, :array_4

    aput-object v1, v0, v3

    const/4 v1, 0x4

    new-array v2, v3, [I

    fill-array-data v2, :array_5

    aput-object v2, v0, v1

    sput-object v0, Lcom/ninesky/browser/view/TagCloudView;->c:[[I

    new-array v0, v6, [Landroid/content/res/ColorStateList;

    sput-object v0, Lcom/ninesky/browser/view/TagCloudView;->d:[Landroid/content/res/ColorStateList;

    new-array v0, v3, [[I

    new-array v1, v5, [I

    const v2, 0x10100a7

    aput v2, v1, v4

    aput-object v1, v0, v4

    new-array v1, v5, [I

    const v2, 0x101009c

    aput v2, v1, v4

    aput-object v1, v0, v5

    new-array v1, v4, [I

    aput-object v1, v0, v7

    move v1, v4

    :goto_0
    if-lt v1, v6, :cond_0

    return-void

    :cond_0
    sget-object v2, Lcom/ninesky/browser/view/TagCloudView;->d:[Landroid/content/res/ColorStateList;

    new-instance v3, Landroid/content/res/ColorStateList;

    sget-object v4, Lcom/ninesky/browser/view/TagCloudView;->c:[[I

    aget-object v4, v4, v1

    invoke-direct {v3, v0, v4}, Landroid/content/res/ColorStateList;-><init>([[I[I)V

    aput-object v3, v2, v1

    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    :array_0
    .array-data 0x4
        0x14t 0x0t 0x0t 0x0t
        0x12t 0x0t 0x0t 0x0t
        0x10t 0x0t 0x0t 0x0t
        0xet 0x0t 0x0t 0x0t
        0xct 0x0t 0x0t 0x0t
    .end array-data

    :array_1
    .array-data 0x4
        0x93t 0xe6t 0xc4t 0xfft
        0x93t 0xe6t 0xc4t 0xfft
        0x93t 0xe6t 0xc4t 0xfft
    .end array-data

    :array_2
    .array-data 0x4
        0x33t 0xd1t 0x90t 0xfft
        0x33t 0xd1t 0x90t 0xfft
        0x33t 0xd1t 0x90t 0xfft
    .end array-data

    :array_3
    .array-data 0x4
        0x0t 0xa5t 0x61t 0xfft
        0x0t 0xa5t 0x61t 0xfft
        0x0t 0xa5t 0x61t 0xfft
    .end array-data

    :array_4
    .array-data 0x4
        0x29t 0x7bt 0x59t 0xfft
        0x29t 0x7bt 0x59t 0xfft
        0x29t 0x7bt 0x59t 0xfft
    .end array-data

    :array_5
    .array-data 0x4
        0x36t 0x5at 0x4bt 0xfft
        0x36t 0x5at 0x4bt 0xfft
        0x36t 0x5at 0x4bt 0xfft
    .end array-data
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1

    invoke-direct {p0, p1, p2}, Landroid/widget/TextView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    invoke-virtual {p0}, Lcom/ninesky/browser/view/TagCloudView;->getMovementMethod()Landroid/text/method/MovementMethod;

    move-result-object v0

    if-eqz v0, :cond_0

    instance-of v0, v0, Landroid/text/method/LinkMovementMethod;

    if-nez v0, :cond_1

    :cond_0
    invoke-static {}, Landroid/text/method/LinkMovementMethod;->getInstance()Landroid/text/method/MovementMethod;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/view/TagCloudView;->setMovementMethod(Landroid/text/method/MovementMethod;)V

    :cond_1
    return-void
.end method

.method private static a(IIII)I
    .locals 4

    const/4 v3, 0x1

    div-int/lit8 v0, p0, 0x2

    if-ge p2, p3, :cond_0

    if-lt p1, p2, :cond_0

    if-le p1, p3, :cond_1

    :cond_0
    :goto_0
    return v0

    :cond_1
    sub-int v1, p3, p2

    if-ge v1, p0, :cond_2

    move v1, v3

    :goto_1
    add-int v2, p3, p2

    div-int/lit8 v2, v2, 0x2

    sub-int v2, p1, v2

    div-int v1, v2, v1

    sub-int/2addr v0, v1

    if-gez v0, :cond_3

    const/4 v0, 0x0

    goto :goto_0

    :cond_2
    sub-int v1, p3, p2

    div-int/2addr v1, p0

    goto :goto_1

    :cond_3
    sub-int v1, p0, v3

    if-le v0, v1, :cond_0

    sub-int v0, p0, v3

    goto :goto_0
.end method

.method static synthetic a(Lcom/ninesky/browser/view/TagCloudView;)Lcom/ninesky/browser/view/bi;
    .locals 1

    iget-object v0, p0, Lcom/ninesky/browser/view/TagCloudView;->a:Lcom/ninesky/browser/view/bi;

    return-object v0
.end method


# virtual methods
.method public final a(Lcom/ninesky/browser/view/bi;)V
    .locals 0

    iput-object p1, p0, Lcom/ninesky/browser/view/TagCloudView;->a:Lcom/ninesky/browser/view/bi;

    return-void
.end method

.method public final a([Lcom/ninesky/browser/provider/g;)V
    .locals 24

    if-nez p1, :cond_0

    const/4 v5, 0x0

    :goto_0
    move-object/from16 v0, p0

    move-object v1, v5

    invoke-virtual {v0, v1}, Lcom/ninesky/browser/view/TagCloudView;->setText(Ljava/lang/CharSequence;)V

    return-void

    :cond_0
    const v5, 0x7fffffff

    const/4 v6, 0x0

    const v7, 0x7fffffff

    const/4 v8, 0x0

    move-object/from16 v0, p1

    array-length v0, v0

    move v9, v0

    const/4 v10, 0x0

    move v11, v8

    move v12, v7

    move v13, v6

    move v14, v5

    move v5, v10

    :goto_1
    if-lt v5, v9, :cond_1

    new-instance v15, Landroid/text/SpannableStringBuilder;

    invoke-direct {v15}, Landroid/text/SpannableStringBuilder;-><init>()V

    move-object/from16 v0, p1

    array-length v0, v0

    move/from16 v16, v0

    const/4 v5, 0x0

    move/from16 v17, v5

    :goto_2
    move/from16 v0, v17

    move/from16 v1, v16

    if-lt v0, v1, :cond_2

    move-object v5, v15

    goto :goto_0

    :cond_1
    aget-object v6, p1, v5

    iget v7, v6, Lcom/ninesky/browser/provider/g;->b:I

    if-le v14, v7, :cond_6

    iget v7, v6, Lcom/ninesky/browser/provider/g;->b:I

    :goto_3
    iget v8, v6, Lcom/ninesky/browser/provider/g;->b:I

    if-ge v13, v8, :cond_5

    iget v8, v6, Lcom/ninesky/browser/provider/g;->b:I

    :goto_4
    iget v10, v6, Lcom/ninesky/browser/provider/g;->c:I

    if-le v12, v10, :cond_4

    iget v10, v6, Lcom/ninesky/browser/provider/g;->c:I

    :goto_5
    iget v12, v6, Lcom/ninesky/browser/provider/g;->c:I

    if-ge v11, v12, :cond_3

    iget v6, v6, Lcom/ninesky/browser/provider/g;->c:I

    :goto_6
    add-int/lit8 v5, v5, 0x1

    move v11, v6

    move v12, v10

    move v13, v8

    move v14, v7

    goto :goto_1

    :cond_2
    aget-object v18, p1, v17

    invoke-virtual {v15}, Landroid/text/SpannableStringBuilder;->length()I

    move-result v19

    move-object/from16 v0, v18

    iget-object v0, v0, Lcom/ninesky/browser/provider/g;->a:Ljava/lang/String;

    move-object v5, v0

    invoke-virtual {v15, v5}, Landroid/text/SpannableStringBuilder;->append(Ljava/lang/CharSequence;)Landroid/text/SpannableStringBuilder;

    invoke-virtual {v15}, Landroid/text/SpannableStringBuilder;->length()I

    move-result v20

    const-string v5, "  "

    invoke-virtual {v15, v5}, Landroid/text/SpannableStringBuilder;->append(Ljava/lang/CharSequence;)Landroid/text/SpannableStringBuilder;

    new-instance v5, Landroid/text/style/TextAppearanceSpan;

    const-string v6, "sans"

    const/4 v7, 0x0

    move-object/from16 v0, v18

    iget v0, v0, Lcom/ninesky/browser/provider/g;->c:I

    move v8, v0

    sget-object v9, Lcom/ninesky/browser/view/TagCloudView;->b:[I

    array-length v9, v9

    invoke-static {v9, v8, v12, v11}, Lcom/ninesky/browser/view/TagCloudView;->a(IIII)I

    move-result v9

    const-string v10, "NSBrowser.TagCloudView"

    new-instance v21, Ljava/lang/StringBuilder;

    const-string v22, "uses:"

    invoke-direct/range {v21 .. v22}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, v21

    move v1, v8

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v21, " minUses:"

    move-object v0, v8

    move-object/from16 v1, v21

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8, v12}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v21, " maxUses:"

    move-object v0, v8

    move-object/from16 v1, v21

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8, v11}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v21, " size id:"

    move-object v0, v8

    move-object/from16 v1, v21

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-static {v10, v8}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    sget-object v8, Lcom/ninesky/browser/view/TagCloudView;->b:[I

    aget v8, v8, v9

    move-object/from16 v0, v18

    iget v0, v0, Lcom/ninesky/browser/provider/g;->b:I

    move v9, v0

    sget-object v10, Lcom/ninesky/browser/view/TagCloudView;->d:[Landroid/content/res/ColorStateList;

    array-length v10, v10

    invoke-static {v10, v9, v14, v13}, Lcom/ninesky/browser/view/TagCloudView;->a(IIII)I

    move-result v10

    const-string v21, "NSBrowser.TagCloudView"

    new-instance v22, Ljava/lang/StringBuilder;

    const-string v23, "visits:"

    invoke-direct/range {v22 .. v23}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, v22

    move v1, v9

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v9

    const-string v22, " minVisits:"

    move-object v0, v9

    move-object/from16 v1, v22

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v9

    invoke-virtual {v9, v14}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v9

    const-string v22, " maxVisits:"

    move-object v0, v9

    move-object/from16 v1, v22

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v9

    invoke-virtual {v9, v13}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v9

    const-string v22, " color id:"

    move-object v0, v9

    move-object/from16 v1, v22

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v9

    invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v9

    invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v9

    move-object/from16 v0, v21

    move-object v1, v9

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    sget-object v9, Lcom/ninesky/browser/view/TagCloudView;->d:[Landroid/content/res/ColorStateList;

    aget-object v9, v9, v10

    const/4 v10, 0x0

    invoke-direct/range {v5 .. v10}, Landroid/text/style/TextAppearanceSpan;-><init>(Ljava/lang/String;IILandroid/content/res/ColorStateList;Landroid/content/res/ColorStateList;)V

    const/16 v6, 0x21

    move-object v0, v15

    move-object v1, v5

    move/from16 v2, v19

    move/from16 v3, v20

    move v4, v6

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/text/SpannableStringBuilder;->setSpan(Ljava/lang/Object;III)V

    new-instance v5, Lcom/ninesky/browser/view/bk;

    move-object/from16 v0, v18

    iget-object v0, v0, Lcom/ninesky/browser/provider/g;->a:Ljava/lang/String;

    move-object v6, v0

    move-object v0, v5

    move-object/from16 v1, p0

    move-object v2, v6

    invoke-direct {v0, v1, v2}, Lcom/ninesky/browser/view/bk;-><init>(Lcom/ninesky/browser/view/TagCloudView;Ljava/lang/String;)V

    const/16 v6, 0x21

    move-object v0, v15

    move-object v1, v5

    move/from16 v2, v19

    move/from16 v3, v20

    move v4, v6

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/text/SpannableStringBuilder;->setSpan(Ljava/lang/Object;III)V

    add-int/lit8 v5, v17, 0x1

    move/from16 v17, v5

    goto/16 :goto_2

    :cond_3
    move v6, v11

    goto/16 :goto_6

    :cond_4
    move v10, v12

    goto/16 :goto_5

    :cond_5
    move v8, v13

    goto/16 :goto_4

    :cond_6
    move v7, v14

    goto/16 :goto_3
.end method
